Modern electronic devices such as a smartphone, a tablet computer, smart glasses, and the like are typically equipped with one or more camera units or modules. In these electronic devices, the camera units or modules are used to capture photographs of a variety of types of scenes and objects. Such electronic devices may also have a variety of capabilities or functions for processing the captured photographs such as image processing functions, text recognition functions, etc.
Some users may utilize the electronic devices equipped with camera modules to capture photographs of text objects (e.g., a business card) or a scene including text objects. For example, a user may use his or her electronic device to photograph a street scene including text objects such as street signs. In this case, one or more photographs of the scene including the text objects may be stored in the electronic device and processed for text recognition.
However, some photographs including text may suffer from a variety of lighting conditions that degrade image quality such as specular reflection, diffuse reflection, low light condition, etc. For example, conventional electronic devices may be used to capture a photograph of a text object having a relatively glossy or shiny surface (e.g., a business card printed on glossy paper, a magazine, or the like) in the presence of one or more light sources. In such a case, light from the light sources may reflect from the surface of the text object and result in specular reflection in one or more portions of the photograph. Further, when a specular reflection portion coincides with a portion of text or characters in the text object, the conventional electronic devices may not be able to accurately recognize the text in the text object.